﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Loli.Library.WinIo
{
    public class KeyData
    {
        //键码
        public KeyCodes Code { get; set; }
        //对应字符
        public char[] Char { get; set; }
        //高4位为通码长度，低4位为断码长度
        public byte Length { get; set; }
        //通码
        public byte[] Make { get; set; }
        //断码
        public byte[] Break { get; set; }
    }

    public class KeyDatas : Dictionary<KeyCodes, KeyData>
    {
        public KeyDatas()
        {
            this.Add(KeyCodes.A, new KeyData()
            {
                Code = KeyCodes.A,
                Char = new char[] { 'a', 'A' },
                Length = 0x11,
                Make = new byte[] { 0x1E, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x9E, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.B, new KeyData()
            {
                Code = KeyCodes.B,
                Char = new char[] { 'b', 'B' },
                Length = 0x11,
                Make = new byte[] { 0x30, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB0, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.C, new KeyData()
            {
                Code = KeyCodes.C,
                Char = new char[] { 'c', 'C' },
                Length = 0x11,
                Make = new byte[] { 0x2E, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xAE, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D, new KeyData()
            {
                Code = KeyCodes.D,
                Char = new char[] { 'd', 'D' },
                Length = 0x11,
                Make = new byte[] { 0x20, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xA0, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.E, new KeyData()
            {
                Code = KeyCodes.E,
                Char = new char[] { 'e', 'E' },
                Length = 0x11,
                Make = new byte[] { 0x12, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x92, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F, new KeyData()
            {
                Code = KeyCodes.F,
                Char = new char[] { 'f', 'F' },
                Length = 0x11,
                Make = new byte[] { 0x21, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xA1, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.G, new KeyData()
            {
                Code = KeyCodes.G,
                Char = new char[] { 'g', 'G' },
                Length = 0x11,
                Make = new byte[] { 0x22, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xA2, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.H, new KeyData()
            {
                Code = KeyCodes.H,
                Char = new char[] { 'h', 'H' },
                Length = 0x11,
                Make = new byte[] { 0x23, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xA3, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.I, new KeyData()
            {
                Code = KeyCodes.I,
                Char = new char[] { 'i', 'I' },
                Length = 0x11,
                Make = new byte[] { 0x17, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x97, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.J, new KeyData()
            {
                Code = KeyCodes.J,
                Char = new char[] { 'j', 'J' },
                Length = 0x11,
                Make = new byte[] { 0x24, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xA4, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.K, new KeyData()
            {
                Code = KeyCodes.K,
                Char = new char[] { 'k', 'K' },
                Length = 0x11,
                Make = new byte[] { 0x25, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xA5, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.L, new KeyData()
            {
                Code = KeyCodes.L,
                Char = new char[] { 'l', 'L' },
                Length = 0x11,
                Make = new byte[] { 0x26, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xA6, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.M, new KeyData()
            {
                Code = KeyCodes.M,
                Char = new char[] { 'm', 'M' },
                Length = 0x11,
                Make = new byte[] { 0x32, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB2, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.N, new KeyData()
            {
                Code = KeyCodes.N,
                Char = new char[] { 'n', 'N' },
                Length = 0x11,
                Make = new byte[] { 0x31, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB1, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.O, new KeyData()
            {
                Code = KeyCodes.O,

                Char = new char[] { 'o', 'O' },
                Length = 0x11,
                Make = new byte[] { 0x18, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x98, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.P, new KeyData()
            {
                Code = KeyCodes.P,
                Char = new char[] { 'p', 'P' },
                Length = 0x11,
                Make = new byte[] { 0x19, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x99, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Q, new KeyData()
            {
                Code = KeyCodes.Q,
                Char = new char[] { 'q', 'Q' },
                Length = 0x11,
                Make = new byte[] { 0x10, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x90, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.R, new KeyData()
            {
                Code = KeyCodes.R,
                Char = new char[] { 'r', 'R' },
                Length = 0x11,
                Make = new byte[] { 0x13, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x93, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.S, new KeyData()
            {
                Code = KeyCodes.S,
                Char = new char[] { 's', 'S' },
                Length = 0x11,
                Make = new byte[] { 0x1F, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x9F, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.T, new KeyData()
            {
                Code = KeyCodes.T,
                Char = new char[] { 't', 'T' },
                Length = 0x11,
                Make = new byte[] { 0x14, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x94, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.U, new KeyData()
            {
                Code = KeyCodes.U,
                Char = new char[] { 'u', 'U' },
                Length = 0x11,
                Make = new byte[] { 0x16, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x96, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.V, new KeyData()
            {
                Code = KeyCodes.V,
                Char = new char[] { 'v', 'V' },
                Length = 0x11,
                Make = new byte[] { 0x2F, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xAF, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.W, new KeyData()
            {
                Code = KeyCodes.W,
                Char = new char[] { 'w', 'W' },
                Length = 0x11,
                Make = new byte[] { 0x11, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x91, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.X, new KeyData()
            {
                Code = KeyCodes.X,
                Char = new char[] { 'x', 'X' },
                Length = 0x11,
                Make = new byte[] { 0x2D, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xAD, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Y, new KeyData()
            {
                Code = KeyCodes.Y,
                Char = new char[] { 'y', 'Y' },
                Length = 0x11,
                Make = new byte[] { 0x15, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x95, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Z, new KeyData()
            {
                Code = KeyCodes.Z,
                Char = new char[] { 'z', 'Z' },
                Length = 0x11,
                Make = new byte[] { 0x2C, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xAC, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D0, new KeyData()
            {
                Code = KeyCodes.D0,
                Char = new char[] { '0', ')' },
                Length = 0x11,
                Make = new byte[] { 0x0B, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x8B, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D1, new KeyData()
            {
                Code = KeyCodes.D1,
                Char = new char[] { '1', '!' },
                Length = 0x11,
                Make = new byte[] { 0x02, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x82, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D2, new KeyData()
            {
                Code = KeyCodes.D2,
                Char = new char[] { '2', '@' },
                Length = 0x11,
                Make = new byte[] { 0x03, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x83, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D3, new KeyData()
            {
                Code = KeyCodes.D3,
                Char = new char[] { '3', '#' },
                Length = 0x11,
                Make = new byte[] { 0x04, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x84, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D4, new KeyData()
            {
                Code = KeyCodes.D4,
                Char = new char[] { '4', '$' },
                Length = 0x11,
                Make = new byte[] { 0x05, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x85, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D5, new KeyData()
            {
                Code = KeyCodes.D5,
                Char = new char[] { '5', '%' },
                Length = 0x11,
                Make = new byte[] { 0x06, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x86, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D6, new KeyData()
            {
                Code = KeyCodes.D6,
                Char = new char[] { '6', '^' },
                Length = 0x11,
                Make = new byte[] { 0x07, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x87, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D7, new KeyData()
            {
                Code = KeyCodes.D7,
                Char = new char[] { '7', '&' },
                Length = 0x11,
                Make = new byte[] { 0x08, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x88, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D8, new KeyData()
            {
                Code = KeyCodes.D8,
                Char = new char[] { '8', '*' },
                Length = 0x11,
                Make = new byte[] { 0x09, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x89, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.D9, new KeyData()
            {
                Code = KeyCodes.D9,
                Char = new char[] { '9', '(' },
                Length = 0x11,
                Make = new byte[] { 0x0A, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x8A, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Oemtilde, new KeyData()
            {
                Code = KeyCodes.Oemtilde,
                Char = new char[] { '`', '~' },
                Length = 0x11,
                Make = new byte[] { 0x29, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x89, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.OemMinus, new KeyData()
            {
                Code = KeyCodes.OemMinus,
                Char = new char[] { '-', '_' },
                Length = 0x11,
                Make = new byte[] { 0x0C, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x8C, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Oemplus, new KeyData()
            {
                Code = KeyCodes.Oemplus,
                Char = new char[] { '=', '+' },
                Length = 0x11,
                Make = new byte[] { 0x0D, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x8D, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Oem5, new KeyData()
            {
                Code = KeyCodes.Oem5,
                Char = new char[] { '\\', '|' },
                Length = 0x11,
                Make = new byte[] { 0x2B, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xAB, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.OemOpenBrackets, new KeyData()
            {
                Code = KeyCodes.OemOpenBrackets,
                Char = new char[] { '[', '{' },
                Length = 0x11,
                Make = new byte[] { 0x1A, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x9A, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Oem6, new KeyData()
            {
                Code = KeyCodes.Oem6,
                Char = new char[] { ']', '}' },
                Length = 0x11,
                Make = new byte[] { 0x1B, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x9B, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Oem1, new KeyData()
            {
                Code = KeyCodes.Oem1,
                Char = new char[] { ';', ':' },
                Length = 0x11,
                Make = new byte[] { 0x27, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xA7, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Oem7, new KeyData()
            {
                Code = KeyCodes.Oem7,
                Char = new char[] { '\'', '"' },
                Length = 0x11,
                Make = new byte[] { 0x28, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xA8, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Oemcomma, new KeyData()
            {
                Code = KeyCodes.Oemcomma,
                Char = new char[] { ',', '<' },
                Length = 0x11,
                Make = new byte[] { 0x33, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB3, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.OemPeriod, new KeyData()
            {
                Code = KeyCodes.OemPeriod,
                Char = new char[] { '.', '>' },
                Length = 0x11,
                Make = new byte[] { 0x34, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB4, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.OemQuestion, new KeyData()
            {
                Code = KeyCodes.OemQuestion,
                Char = new char[] { '/', '?' },
                Length = 0x11,
                Make = new byte[] { 0x35, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB5, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Back, new KeyData()
            {
                Code = KeyCodes.Back,
                Char = new char[] { (char)0, (char)0, },
                Length = 0x11,
                Make = new byte[] { 0x0E, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x8E, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Space, new KeyData()
            {
                Code = KeyCodes.Space,
                Char = new char[] { ' ', (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x39, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB9, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Tab, new KeyData()
            {
                Code = KeyCodes.Tab,
                Char = new char[] { (char)9, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x0F, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x8F, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.CapsLock, new KeyData()
            {
                Code = KeyCodes.CapsLock,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x3A, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xBA, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.LShiftKey, new KeyData()
            {
                Code = KeyCodes.LShiftKey,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x2A, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xAA, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.LControlKey, new KeyData()
            {
                Code = KeyCodes.LControlKey,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x1D, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x9D, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.LWin, new KeyData()
            {
                Code = KeyCodes.LWin,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x5B, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xDB, 0x00, 0x00 }
            });
            this.Add(KeyCodes.LMenu, new KeyData()
            {
                Code = KeyCodes.LMenu,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x38, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB8, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.RShiftKey, new KeyData()
            {
                Code = KeyCodes.RShiftKey,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x36, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB6, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.RControlKey, new KeyData()
            {
                Code = KeyCodes.RControlKey,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x1D, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0x9D, 0x00, 0x00 }
            });
            this.Add(KeyCodes.RWin, new KeyData()
            {
                Code = KeyCodes.RWin,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x5C, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xDC, 0x00, 0x00 }
            });
            this.Add(KeyCodes.RMenu, new KeyData()
            {
                Code = KeyCodes.RMenu,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x38, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xB8, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Apps, new KeyData()
            {
                Code = KeyCodes.Apps,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x5D, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xDD, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Enter, new KeyData()
            {
                Code = KeyCodes.Enter,
                Char = new char[] { (char)13, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x1C, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x9C, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Escape, new KeyData()
            {
                Code = KeyCodes.Escape,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x01, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0x81, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F1, new KeyData()
            {
                Code = KeyCodes.F1,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x3B, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xBB, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F2, new KeyData()
            {
                Code = KeyCodes.F2,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x3C, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xBC, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F3, new KeyData()
            {
                Code = KeyCodes.F3,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x3D, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xBD, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F4, new KeyData()
            {
                Code = KeyCodes.F4,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x3E, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xBE, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F5, new KeyData()
            {
                Code = KeyCodes.F5,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x3F, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xBF, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F6, new KeyData()
            {
                Code = KeyCodes.F6,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x40, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC0, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F7, new KeyData()
            {
                Code = KeyCodes.F7,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x41, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC1, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F8, new KeyData()
            {
                Code = KeyCodes.F8,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x42, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC2, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F9, new KeyData()
            {
                Code = KeyCodes.F9,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x43, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC3, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F10, new KeyData()
            {
                Code = KeyCodes.F10,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x44, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC4, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F11, new KeyData()
            {
                Code = KeyCodes.F11,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x57, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xD7, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.F12, new KeyData()
            {
                Code = KeyCodes.F12,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x58, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xD8, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.PrintScreen, new KeyData()
            {
                Code = KeyCodes.PrintScreen,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x44,
                Make = new byte[] { 0xE0, 0x2A, 0xE0, 0x37 },
                Break = new byte[] { 0xE0, 0xB7, 0xE0, 0xAA }
            });
            this.Add(KeyCodes.Scroll, new KeyData()
            {
                Code = KeyCodes.Scroll,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x46, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC6, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Pause, new KeyData()
            {
                Code = KeyCodes.Pause,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x33,
                Make = new byte[] { 0xE1, 0x1D, 0x45, 0x00 },
                Break = new byte[] { 0xE1, 0x9D, 0xC5, 0x00 }
            });
            this.Add(KeyCodes.Insert, new KeyData()
            {
                Code = KeyCodes.Insert,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x52, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xD2, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Home, new KeyData()
            {
                Code = KeyCodes.Home,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x47, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0x97, 0x00, 0x00 }
            });
            this.Add(KeyCodes.PageUp, new KeyData()
            {
                Code = KeyCodes.PageUp,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x49, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xC9, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Delete, new KeyData()
            {
                Code = KeyCodes.Delete,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x53, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xD3, 0x00, 0x00 }
            });
            this.Add(KeyCodes.End, new KeyData()
            {
                Code = KeyCodes.End,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x4F, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xCF, 0x00, 0x00 }
            });
            this.Add(KeyCodes.PageDown, new KeyData()
            {
                Code = KeyCodes.PageDown,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x51, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xD1, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Up, new KeyData()
            {
                Code = KeyCodes.Up,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x48, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xC8, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Left, new KeyData()
            {
                Code = KeyCodes.Left,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x4B, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xCB, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Down, new KeyData()
            {
                Code = KeyCodes.Down,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x50, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xD0, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Right, new KeyData()
            {
                Code = KeyCodes.Right,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x4D, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xCD, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumLock, new KeyData()
            {
                Code = KeyCodes.NumLock,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x45, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC5, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Divide, new KeyData()
            {
                Code = KeyCodes.Divide,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x35, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0xB5, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Multiply, new KeyData()
            {
                Code = KeyCodes.Multiply,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x37, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xB7, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Subtract, new KeyData()
            {
                Code = KeyCodes.Subtract,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x4A, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xCA, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Add, new KeyData()
            {
                Code = KeyCodes.Add,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x4E, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xCE, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Return, new KeyData()
            {
                Code = KeyCodes.Return,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x22,
                Make = new byte[] { 0xE0, 0x1C, 0x00, 0x00 },
                Break = new byte[] { 0xE0, 0x9C, 0x00, 0x00 }
            });
            this.Add(KeyCodes.Decimal, new KeyData()
            {
                Code = KeyCodes.Decimal,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x53, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xD3, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad0, new KeyData()
            {
                Code = KeyCodes.NumPad0,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x52, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xD2, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad1, new KeyData()
            {
                Code = KeyCodes.NumPad1,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x4F, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xCF, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad2, new KeyData()
            {
                Code = KeyCodes.NumPad2,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x50, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xD0, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad3, new KeyData()
            {
                Code = KeyCodes.NumPad3,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x51, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xD1, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad4, new KeyData()
            {
                Code = KeyCodes.NumPad4,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x4B, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xCB, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad5, new KeyData()
            {
                Code = KeyCodes.NumPad5,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x4C, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xCC, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad6, new KeyData()
            {
                Code = KeyCodes.NumPad6,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x4D, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xCD, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad7, new KeyData()
            {
                Code = KeyCodes.NumPad7,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x47, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC7, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad8, new KeyData()
            {
                Code = KeyCodes.NumPad8,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x48, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC8, 0x00, 0x00, 0x00 }
            });
            this.Add(KeyCodes.NumPad9, new KeyData()
            {
                Code = KeyCodes.NumPad9,
                Char = new char[] { (char)0, (char)0 },
                Length = 0x11,
                Make = new byte[] { 0x49, 0x00, 0x00, 0x00 },
                Break = new byte[] { 0xC9, 0x00, 0x00, 0x00 }
            });


        }
    }
}
